//扔最少次的鸡蛋，在最坏情况下找到扔下会碎的那层楼
public class DropEggs {
}
class DropEggsSolution {
    public int superEggDrop(int k, int n) {
        if(n==1)return 1;
        int[][] dp = new int[n+1][k+1];
        int count = 0;
        for(;dp[count][k]<n;){
            count++;
            for(int i=1;i<=k;i++)
                dp[count][i] = dp[count-1][i]+dp[count-1][i-1]+1;
        }
        return count;
    }
}